cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

find_package(LibL2 REQUIRED)
include_directories(${LibL2_INCLUDE_DIRS})
set(LIBS ${LibL2_LIBRARIES})

add_executable(l2extract
  main_l2extract.c
  l2extract_netcdf.c
)

include_directories (
  ${CMAKE_SOURCE_DIR}/src/l2gen
)

target_link_libraries(l2extract
  ${LIBS}
)

install (TARGETS l2extract DESTINATION bin)

